<%@page import="com.egame.manage.biz.utils.ConstVar"%>
<%@page import="java.io.Console"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="cn.egame.ext.EnumTypeExt.OperationActivityRecordType"%>
<%@page import="cn.egame.ext.EnumTypeExt.OperationActivityPosition"%>
<%@page import="cn.egame.interfaces.fl.FileUsedType"%>  
<%@page import="cn.egame.interfaces.pu.AppParameter"%>  

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<% 
	String urlString = request.getContextPath() + "/store/necessary/sort/set/edit.do"; 
%>
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath() %>/css/main.css"  />
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
	function formSubmit(){		
		var isSubmit = true;
		var td = $("#myform").find("td[name='notnone']");
		
		for(var i = 0; i<td.length; i++){
			if($(td[i]).find("input[type='text']").val() == "" || ($(td[i]).find("select")[0] && $(td[i]).find("option:selected").val() == 0)){
				$(td[i]).find("span").remove();
				$(td[i]).append("<span class='page_tip'>*必填</span>");
				isSubmit = false;
				return;
			}else{
				$(td[i]).find("span").remove();
			}
		}
		if(isSubmit){
			document.getElementById("myform").submit();
		}else{
			return;
		}
	}
</script>
<title>新增页面</title>
</head>
<body>
<div class="matter_box">
	<h3 class="nopoint"><strong>彩蛋&gt;手机必备&gt;编辑</strong></h3>
	<div class="mt10 pt10 clearfix">
<form action=<%=urlString %> id="myform"  method="post" enctype="multipart/form-data">
		<%
			if(request.getAttribute("bean")!=null){
				AppParameter bean = (AppParameter)request.getAttribute("bean");			
		%>
		<table class="table2">		
			<tr>
				<td>分类</td>
				<td name="notnone">
					<input type="hidden" name="id" value=<%=bean.getId()%>>
					<input type="hidden" name="sort" value=<%=bean.getSort()%>>
					<input type=text name="name" value=<%=bean.getName()%>>
				</td>
			</tr>
			<tr>
				<td colspan=2>
					<input type=button onclick="formSubmit()" class="btn3" value="确认">
					<input type=button onclick="window.history.go(-1)" class="btn3" value="取消">
				</td>
			</tr>	
		</table>
		<%
			}
		%>
	</form>
</div>
</div>
</body>
</html>